import torch
from aslp_ai.transformer.embedding import (PositionalEncoding,
                                           RelPositionalEncoding,
                                           RopePositionalEncoding,
                                           WhisperPositionalEncoding,
                                           LearnablePositionalEncoding,
                                           NoPositionalEncoding)
from aslp_ai.paraformer.embedding import ParaformerPositinoalEncoding
from aslp_ai.transformer.norm import RMSNorm

ACTIVATION_CLASSES = {
    "hardtanh": torch.nn.Hardtanh,
    "tanh": torch.nn.Tanh,
    "relu": torch.nn.ReLU,
    "selu": torch.nn.SELU,
    "swish": torch.nn.SiLU,
    "gelu": torch.nn.GELU,
}

EMB_CLASSES = {
    "embed": PositionalEncoding,
    "abs_pos": PositionalEncoding,
    "rel_pos": RelPositionalEncoding,
    "no_pos": NoPositionalEncoding,
    "abs_pos_whisper": WhisperPositionalEncoding,
    "embed_learnable_pe": LearnablePositionalEncoding,
    "abs_pos_paraformer": ParaformerPositinoalEncoding,
    'rope_pos': RopePositionalEncoding,
}

NORM_CLASSES = {
    'layer_norm': torch.nn.LayerNorm,
    'batch_norm': torch.nn.BatchNorm1d,
    'rms_norm': RMSNorm
}